

uniform mat4 boneMat[96];
attribute vec4 bone;
attribute vec4 weight;

void main(void)
{
	vec4 blendVertex = vec4(0, 0, 0, 0);
    
    for(int i = 0; i < 4; i++)
    {    
		if( bone[i] >-1 ){
			blendVertex += boneMat[int(bone[i])] * gl_Vertex * weight[i];
		}
    }
    
	gl_Position = gl_ModelViewMatrix*blendVertex;
}